import {NavLink,  useRoutes} from 'react-router-dom'
import routes from './routes'

export default function App() {

  return (
    <>
      <div className="row">
        <div className="col-xs-8">
          <div className="page-header">
            <h2>集成多个案例</h2>
          </div>
        </div>
      </div>
      <div className="row">
        <div className="col-xs-2">
          <div className="list-group">
            <NavLink className="list-group-item" to="/counter">计数器</NavLink>
            <NavLink className="list-group-item" to="/todolist">计划列表</NavLink>
            <NavLink className="list-group-item" to="/usersearch">用户搜索</NavLink>
          </div>
        </div>
        <div className="col-xs-8">
          <div className="panel">
            <div className="panel-body">
              { useRoutes(routes) }
            </div>
          </div>
        </div>
      </div>
    </>
  )
}
